package org.budo.cmbc.direct.sdk.entity;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * @author lmw
 */
@Getter
@Setter
@Accessors(chain = true)
@NoArgsConstructor
@ToString(callSuper = true)
public class MELEIdPhotoUploadResponse extends AbstractCmbcDirectResponse {
    private static final long serialVersionUID = -6243238395731998510L;

    private String idPNo;

    private String status;

    private String reason;

    public MELEIdPhotoUploadResponse(String channelJnlNo, String responseJson) {
        super(channelJnlNo, responseJson);

        JSONObject jsonObject = JSON.parseObject(responseJson);
        this.setReason(jsonObject.getString("Reason"));
        this.setStatus(jsonObject.getString("Status"));
        this.setIdPNo(jsonObject.getString("IdPNo"));
    }
}